package com.yuyuan.blog.controller;


import com.yuyuan.blog.service.ILikeService;
import com.yuyuan.common.domain.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: kestrel
 * @Version:1.0
 * @Date: 2024/6/20
 */
@RestController
@RequestMapping("/blogService/like")
public class LikeController {

    @Autowired
    private ILikeService likeService;

    //点赞评论
    @PutMapping("/comment/{commentId}")
    public Result likeComment(@PathVariable Long commentId){
        return likeService.likeComment(commentId);
    }

    //点赞贴子
    @PutMapping("/blog/{blogId}")
    public Result likeBlog(@PathVariable Long blogId){
        return likeService.likeBlog(blogId);
    }
}
